/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.jeemicro.weixin.modules.timer_quartz.entity;

import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;

import com.jeemicro.weixin.common.persistence.DataEntity;

/**
 * 定时器管理配置Entity
 * @author 宋雅健
 * @version 2017-05-15
 */
public class TimerQuartz extends DataEntity<TimerQuartz> {
	
	private static final long serialVersionUID = 1L;
	private Integer jobid;		// 作业ID
	private String jobname;		// 作业名称
	private String jobdesc;		// 作业描述
	private String jobgroup;		// 作业组
	private String triggername;		// 触发器名称
	private String triggergroup;		// 触发器组
	private String classname;		// 执行代码的类名
	private String enablestatus;		// 状态开关
	private String triggercron;		// 定时设置
	private String triggerstatus;		// 运行状态
	
	public TimerQuartz() {
		super();
	}

	public TimerQuartz(String id){
		super(id);
	}

	@NotNull(message="作业ID不能为空")
	public Integer getJobid() {
		return jobid;
	}

	public void setJobid(Integer jobid) {
		this.jobid = jobid;
	}
	
	@Length(min=1, max=256, message="作业名称长度必须介于 1 和 256 之间")
	public String getJobname() {
		return jobname;
	}

	public void setJobname(String jobname) {
		this.jobname = jobname;
	}
	
	@Length(min=0, max=256, message="作业描述长度必须介于 0 和 256 之间")
	public String getJobdesc() {
		return jobdesc;
	}

	public void setJobdesc(String jobdesc) {
		this.jobdesc = jobdesc;
	}
	
	@Length(min=0, max=256, message="作业组长度必须介于 0 和 256 之间")
	public String getJobgroup() {
		return jobgroup;
	}

	public void setJobgroup(String jobgroup) {
		this.jobgroup = jobgroup;
	}
	
	@Length(min=0, max=256, message="触发器名称长度必须介于 0 和 256 之间")
	public String getTriggername() {
		return triggername;
	}

	public void setTriggername(String triggername) {
		this.triggername = triggername;
	}
	
	@Length(min=0, max=128, message="触发器组长度必须介于 0 和 128 之间")
	public String getTriggergroup() {
		return triggergroup;
	}

	public void setTriggergroup(String triggergroup) {
		this.triggergroup = triggergroup;
	}
	
	@Length(min=0, max=128, message="执行代码的类名长度必须介于 0 和 128 之间")
	public String getClassname() {
		return classname;
	}

	public void setClassname(String classname) {
		this.classname = classname;
	}
	
	@Length(min=0, max=2, message="状态开关长度必须介于 0 和 2 之间")
	public String getEnablestatus() {
		return enablestatus;
	}

	public void setEnablestatus(String enablestatus) {
		this.enablestatus = enablestatus;
	}
	
	@Length(min=0, max=256, message="定时设置长度必须介于 0 和 256 之间")
	public String getTriggercron() {
		return triggercron;
	}

	public void setTriggercron(String triggercron) {
		this.triggercron = triggercron;
	}
	
	@Length(min=0, max=2, message="运行状态长度必须介于 0 和 2 之间")
	public String getTriggerstatus() {
		return triggerstatus;
	}

	public void setTriggerstatus(String triggerstatus) {
		this.triggerstatus = triggerstatus;
	}
	
}